package com.gitee.starblues.example.basic1.service;

import com.gitee.starblues.bootstrap.annotation.AutowiredType;
import com.gitee.starblues.core.descriptor.PluginDescriptor;
import com.gitee.starblues.example.service.MainUserService;
import com.gitee.starblues.example.service.TestAnnotation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author starBlues
 * @version 1.0
 * @since 2021-08-01
 */
@Service
@TestAnnotation
@Scope("prototype")
public class BasicService {

    @Autowired
    private PluginDescriptor pluginDescriptor;

    @Autowired
    @AutowiredType(value = AutowiredType.Type.MAIN)
    private MainUserService mainUserService;

    public String getName(){
        System.out.println(mainUserService.getById(1));
        return BasicService.class.getName();
    }

}
